/*
*
* FILENAME:		externals.h
* CREATED AT:		2012/May/5
* DECRITION:		achieve all the extern variable or function here
* 
* MODULE:		any
* PLATFORM:		ubuntu-12.04/gcc-4.6.3
* AUTHOR:		incarnation-lee
* 
* ----------------------REVISION HISTROY------------------------
* No.	Date	Revised by	Function	Descrition
* 1	12/5/7	incar-lee	NA		for external element
*
*/

#ifndef LINEAR_LIST_H
#define LINEAR_LIST_H

#include "udgtd.h"


STATUS linear_app_demo(void) __attribute__((pure));
STATUS linear_seq_demo(void) __attribute__((pure));
STATUS linear_slk_demo(void) __attribute__((pure));

/* operation functions on data element */
extern STATUS init_lseq(S_sqlinear*);			/* initilize the linear seq list */
extern STATUS destory_lseq(S_sqlinear*);		/* destroy the linear */
extern STATUS clear_lseq(S_sqlinear*);			/* clear all the element of linear list */
extern STATUS isEmpty_lseq(S_sqlinear*);		/* linear list is empty */
extern size_t len_lseq(S_sqlinear*);			/* the number of linear list */
extern STATUS add_lseq(S_sqlinear*,S_element*);		/* add a new element append the linear list */
extern S_element* get_lseq(S_sqlinear*,int);		/* get the element of index in linear list */
extern S_element* next_lseq(S_sqlinear*,int);		/* the next element */
extern S_element* prior_lseq(S_sqlinear*,int);		/* the prior element*/
extern STATUS insert_lseq(S_sqlinear*,S_element*,int);	/* insert a data element */
extern STATUS delete_lseq(S_sqlinear*,int);		/* delete a data element */


/* operation functions on data element */
extern STATUS init_slnk(S_slk_lr**);				/* initilize the linear seq list */
extern STATUS clear_slnk(S_slk_lr**);				/* clear all the element of linear list */
extern STATUS destory_slnk(S_slk_lr**);				/* clear all the element of linear list */
extern STATUS isEmpty_slnk(S_slk_lr*);				/* linear list is empty */
extern size_t len_slnk(S_slk_lr*);				/* the number of linear list */
extern STATUS add_slnk(S_slk_lr*,S_slk_lr*);			/* add a new element append the linear list */
extern S_slk_lr* get_slnk(S_slk_lr*,const S_slk_lr*);		/* get the element of index in linear list */
extern S_slk_lr* next_slnk(S_slk_lr*,const S_slk_lr*);		/* get the element of index in linear list */
extern S_slk_lr* prior_slnk(S_slk_lr*,const S_slk_lr*);		/* get the element of index in linear list */
extern STATUS insert_slnk(S_slk_lr*,S_slk_lr*,S_slk_lr*);	/* insert a data element */
extern STATUS delete_slnk(S_slk_lr*,S_slk_lr*);			/* delete a data element */

#endif
